package org.september.pisces.settings.service;

import org.september.core.constant.enums.DeleteFlag;
import org.september.pisces.cache.aop.SimpleCache;
import org.september.pisces.settings.entity.SystemSettings;
import org.september.smartdao.common.BaseService;
import org.springframework.stereotype.Service;

@Service
public class InnerSettingService extends BaseService {
	
	@SimpleCache(timeoutSec = 3600)
	SystemSettings getByKey(String group ,String key) {
		SystemSettings setting = new SystemSettings();
		setting.setCfgKey(key);
		setting.setGroupName(group);
		setting.setDeleteFlag(DeleteFlag.NotDelete.ordinal());
		return getCommonDao().getByExample(setting);
	}
}
